<template>
  <div class="contaniner">
    
    <error-tip/>
    <div v-if="!errorCode">
      <month-list :data="monthData"></month-list>
    </div>
  </div>

</template>

<script>

import MonthList from '@/components/MonthDage/List';
import ErrorTip from '@/components/ErrorTip/ComErr';

import { onMounted, computed} from 'vue';
import {getNowDate} from '@/libs/utils'
import getData from '@/services' 
import { useStore } from 'vuex';

export default {
   name: 'MonthPage',
   components:{
      MonthList,
      ErrorTip
   },
    
  setup(){
     const store = useStore(),
            state = store.state;

  onMounted(()=>{
    getData(store,'month',getNowDate('month'))
  });

  return {
    monthData:computed(()=>state.monthData),
   errorCode: computed(()=>state.errorCode) 
  }

}


}
</script>

<style>

</style>